package Animal;

import java.applet.Applet;
import java.applet.AudioClip;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;

import Animalmanagement.Animal;

public class Furseal extends Animal {
	String Image = "src/source/animalpicture/7.jpg";
	String[] showfurseal = { "src/source/animalshow/furseal1.jpg",
			"src/source/animalshow/furseal2.jpg",
			"src/source/animalshow/furseal3.jpg" };

	// specify the sound to play (assuming the sound can be played by the audio
	// system) should work file is of type .wav
	private File soundFile = new File("src/source/furseal_sound.wav"); // File
																		// is
																		// defined
																		// for
																		// furseal
																		// sound
																		// filepath
																		// may
																		// need
																		// to be
																		// changed
	private AudioInputStream audioStream;
	private AudioFormat audioFormat;
	private SourceDataLine sourceLine;

	public Furseal(String name, String habitat, String food, String height) {
		super(name, habitat, food, height);
	}

	@Override
	public void makeNoise() {
		try {
			AudioClip clip = Applet.newAudioClip(new URL(
					"file:src/source/sound/Furseal.wav"));
			clip.play();
		} catch (MalformedURLException murle) {
			murle.printStackTrace();
		}
	}

	@Override
	public String showImage() {
		return Image;
	}

	public String[] showevents() {
		return showfurseal;
	}
}
